1. Field of the Invention
The present invention relates to a method of automatic gain modulation and an apparatus implementing the same, more particularly to prevent the unstable state under a conventional auto-gain mechanism and to hold the signal under an upper threshold when the audio signal is around a crackle state.
2. Description of Related Art
Automatic gain control (AGC) technology has been applied to many electronic devices, especially the devices having audio outputs. According to the automatic gain control mechanism, an average output signal of the electronic device is fed back to an input end for modulating a gain for the input signal. In doing so, the electronic device may decrease the overly high sound volume, or increase the overly low one. Therefore, the electronic device may create a superior audience experience even when dealing with the output audio signal of widely spread distribution of the sound intensity.
The above-mentioned automatic gain-control mechanism can also be used for recording technology. Through the automatic gain modulation as approaching the over-high volume, the recording can get better quality. For example, if an unpredictably spike in terms of a sound volume of an audio signal occurs over the course of the recording, such automatic gain control mechanism may make an adjustment to that particular part of the audio signal. The immediate automatic gain-modulation mechanism can prevent the uncomfortable condition.
The automatic gain-control mechanism has a predetermined gain. When the volume exceeds a threshold causing a crackle, the automatic gain control mechanism could be activated from an idle state to enter into an attack time. In the meantime, a common automatic gain-control mechanism will be activated from an idle state and an attack time is entered. The gain is gradually decreased with the passage of time. After a specific period of time, a hold time is entered. The gain will not be modulated in the hold time. Then a release time is entered when the gain holds for a while, and the gain is gradually increased to the predetermined gain by the automatic gain-control mechanism. After that, the automatic gain-control mechanism goes back to the idle state. It is noted that the gain can be a positive value or a negative value.
FIG. 1 describes a signal processed by a conventional automatic gain-control modulation. The original audio signal is originally under a stable output state. When the intensity of a sudden signal is greater than the maximum upper threshold, an automatic gain-control mechanism is activated. Such as the above description, the gain is gradually decreased as entering the attack time. Next, it enters the hold time. After a specific period of time, the release time is entered. As shown in the diagram, when the intensity approaches the maximum upper threshold, the intensity may exceed the maximum upper threshold since the gain will be increased by an enhance gain within the release time.
Thus, the automatic gain-control mechanism will drive the sound enter the attack time if the intensity may exceed the maximum upper threshold. The intensity can be decreased by a specific gain as entering the attack time. Then the sound enters the hold time and the release time for adding the enhance gain. However, the mechanism may make the sound fluctuated around the maximum upper threshold and cause the volume frequently enter the attack time for decreasing gain and the release time for adding gain within a short time. Therefore the sawtooth signal or clip wave may happen such as the schematic diagram shown in FIG. 1, and a lot of noises (101) are produced. If the intensity is fluctuated around the maximum upper threshold, the mentioned sawtooth signal or clip wave will be periodically produced and make people feel uncomfortable.
FIG. 2 is a waveform diagram of the noise produced by the conventional automatic gain-control mechanism within a release time. This diagram shows a portion of the FIG. 1. Apparently, the release time is entered for increasing the gain to the predetermined gain after the hold time holds for a while. Since the sound is fluctuated around the maximum upper threshold, the crackle may be met soon and the next attack time is entered for gradually decreasing the gain, in order to avoid exceeding the maximum upper threshold.